import {adminUrl} from "@/utils/baseUrl.js"
import request from '@/utils/request'

// 创建学员信息
export function createStudentRoll(data) {
  return request({
    url: adminUrl + '/collegebase/student-roll/create',
    method: 'post',
    data: data
  })
}

// 更新学员信息
export function updateStudentRoll(data) {
  return request({
    url: adminUrl + '/collegebase/student-roll/update',
    method: 'put',
    data: data
  })
}

// 删除学员信息
export function deleteStudentRoll(id) {
  return request({
    url: adminUrl + '/collegebase/student-roll/delete?id=' + id,
    method: 'delete'
  })
}

// 获得学员信息
export function getStudentRoll(id) {
  return request({
    url: adminUrl + '/collegebase/student-roll/get?id=' + id,
    method: 'get'
  })
}

// 获得学员信息分页
export function getStudentRollPage(query) {
  return request({
    url: adminUrl + '/collegebase/student-roll/page',
    method: 'get',
    params: query
  })
}

// 导出学员信息 Excel
export function exportStudentRollExcel(query) {
  return request({
    url: adminUrl + '/collegebase/student-roll/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
